from os import name as os_platform_name

def getNativePlatform():
    g = globals()
    l = locals()
    module = '%s.%s' % (__name__, os_platform_name)

    try: return __import__(module, g, l, ['']).NativePlatform
    except ImportError:
        # XXX Differentiate between ImportErrors because module doesn't exist,
        # and those because of errors in the init code.
        raise SystemError('Platform not supported: %r' % os_platform_name)
